
#include <cassert>
#include <iostream>
#include <set>
using namespace std;

int main() {
  // 会自动去重
  set<int> a{6, 1, 3, 4, 2, 5};
  a.insert(2);
  a.insert(3);
  a.insert(2);
  cout << "size = " << a.size() << endl;

  for (auto iter = a.cbegin(); iter != a.cend(); ++iter)
    cout << *iter << endl;
  return 0;
}